<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ page import="com.ymt.bpm.util.Const" %>
<!DOCTYPE html>
<%
String path = request.getContextPath();
String loginName = (String)session.getAttribute(Const.LOGINNAME);
String displayName = (String)session.getAttribute(Const.DISPLAYNAME);
String lang = (String)session.getAttribute(Const.LANG);

String profile = (String)request.getAttribute("profile");
String productionVersion = (String)request.getAttribute("productionVersion");
String cdn = (String)request.getAttribute("cdn");
String fmdCtx = (String)request.getAttribute("fmdCtx");

String newTsId = (String)request.getAttribute("newTsId");
%>
<html>
<head>
	<title>&nbsp;&nbsp;&nbsp;</title>
	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">

	<link rel="shortcut icon" href="<%=cdn%>/favicon.ico"/>

	<%
	if ("dev".equalsIgnoreCase(profile)) {
	%>
	<link href="<%=cdn%>/static/skins/lightblue/assets/dhtmlx4/skins/dhx_skyblue_clouds/dhtmlx.css" rel="stylesheet" type="text/css">

	<link href="<%=cdn%>/static/skins/lightblue/assets/bootstrap/global/plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
	<link href="<%=cdn%>/static/skins/lightblue/assets/bootstrap/global/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css">

	<link href="<%=cdn%>/static/skins/lightblue/assets/bootstrap/global/css/components-md.css" rel="stylesheet" type="text/css">
	<link href="<%=cdn%>/static/skins/lightblue/assets/bootstrap/global/css/plugins-md.css" rel="stylesheet" type="text/css">

	<link href="<%=cdn%>/static/skins/lightblue/assets/bootstrap/global/plugins/bootstrap-sweetalert/sweetalert.css" rel="stylesheet" type="text/css">
	<link href="<%=cdn%>/static/skins/lightblue/assets/bootstrap/global/plugins/bootstrap-toastr/toastr.min.css" rel="stylesheet" type="text/css">

	<link href="<%=cdn%>/static/jsplatform/portal/layout/task/v0/custom.css" rel="stylesheet">
	<link href="<%=cdn%>/static/jsplatform/portal/layout/task/v0/wrapper.css" rel="stylesheet">

	<link href="<%=cdn%>/static/skins/lightblue/assets/jquery-ui/jquery-ui.css" rel="stylesheet" type="text/css">
	<link href="<%=cdn%>/static/skins/lightblue/assets/bootstrap/global/plugins/jstree/themes/default/style.min.css" rel="stylesheet" type="text/css">

	<link href="<%=cdn%>/static/skins/lightblue/assets/bootstrap/global/plugins/bootstrap-timepicker/bootstrap-timepicker.min.css" rel="stylesheet" type="text/css">
	<link href="<%=cdn%>/static/skins/lightblue/assets/bootstrap/global/plugins/bootstrap-datetimepicker/bootstrap-datetimepicker.min.css" rel="stylesheet" type="text/css">
	<link href="<%=cdn%>/static/skins/lightblue/assets/bootstrap/global/plugins/bootstrap-datepicker/css/bootstrap-datepicker3.min.css" rel="stylesheet" type="text/css">

	<link href="<%=cdn%>/static/skins/lightblue/assets/bootstrap/global/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet" type="text/css">

	<% } else { %>
	<link href="<%=cdn%>/static/skins/lightblue/assetsmin/platform/task/task.all.css?<%=productionVersion%>" rel="stylesheet" type="text/css">
	<% }%>

</head>

<body>

	<!--Script should before formfile-->
	<%
	if ("dev".equalsIgnoreCase(profile)) {
	%>
	<script src="<%=cdn%>/static/jslib/3rdpartyother/json2.js" type="text/javascript"></script>
	<script src="<%=cdn%>/static/jslib/3rdpartyother/lodash.core.js" type="text/javascript"></script>
	<script src="<%=cdn%>/static/jslib/bootstrap/global/plugins/jquery.js" type="text/javascript"></script>
	<script src="<%=cdn%>/static/jslib/jquery/jquery.form.min.js" type="text/javascript"></script>
	<script src="<%=cdn%>/static/jslib/3rdpartyother/angular-all.min.js" type="text/javascript"></script>
	<script src="<%=cdn%>/static/jslib/jquery/jquery.tipsy.js" type="text/javascript"></script>

	<script src="<%=cdn%>/static/jslib/bootstrap/global/plugins/jquery-ui/jquery-ui.min.js" type="text/javascript"></script>

	<script src="<%=cdn%>/static/jslib/dhtmlx4/alone/dhxgrid.js" type="text/javascript"></script>
	<script src="<%=cdn%>/static/jslib/dhtmlx4/ext/dhxgrid.js" type="text/javascript"></script>
	<script src="<%=cdn%>/static/jslib/dhtmlx4/ext/excell_types.js" type="text/javascript"></script>
	<script src="<%=cdn%>/static/jslib/dhtmlx4/alone/dhxtoolbar.js" type="text/javascript"></script>

	<script src="<%=cdn%>/static/jslib/bootstrap/global/plugins/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>

	<script src="<%=cdn%>/static/jslib/bootstrap/global/plugins/bootstrap-timepicker/bootstrap-timepicker.js" type="text/javascript"></script>
	<script src="<%=cdn%>/static/jslib/bootstrap/global/plugins/bootstrap-datetimepicker/bootstrap-datetimepicker.js" type="text/javascript"></script>
	<script src="<%=cdn%>/static/jslib/bootstrap/global/plugins/bootstrap-table/bootstrap-table.js" type="text/javascript"></script>

	<script src="<%=cdn%>/static/jslib/bootstrap/global/plugins/bootstrap-sweetalert/sweetalert.js" type="text/javascript"></script>
	<script src="<%=cdn%>/static/jslib/bootstrap/global/plugins/bootstrap-toastr/toastr.js" type="text/javascript"></script>
	<script src="<%=cdn%>/static/jslib/bootstrap/global/plugins/bootbox/bootbox.min.js" type="text/javascript"></script>
	<script src="<%=cdn%>/static/jslib/bootstrap/global/plugins/jstree/jstree.min.js"></script>

	<script src="<%=cdn%>/static/jsplatform/portal/layout/task/v0/bootstrap-modal-ext.js" type="text/javascript"></script>
	<script src="<%=cdn%>/static/jsplatform/portal/layout/task/v0/common.js" type="text/javascript"></script>

	<script src="<%=cdn%>/static/jslib/bootstrap/global/plugins/bootstrap-datetimepicker/locales/bootstrap-datetimepicker.<%=lang%>.js" type="text/javascript"></script>
	<script src="<%=cdn%>/static/jslib/bootstrap/global/plugins/bootstrap-table/locale/bootstrap-table-<%=lang%>.js" type="text/javascript"></script>

	<script src="<%=cdn%>/static/jslib/3rdpartyother/svg/snap.svg-min.js" type="text/javascript"></script>
	<script src="<%=cdn%>/static/jslib/3rdpartyother/svg/vivus.js" type="text/javascript"></script>

	<script src="<%=cdn%>/static/jsplatform/admin/designer/flow_style.js" type="text/javascript"></script>
	<% } else { %>
	<script src="<%=cdn%>/static/jsmin/platform/task/task.all.js?<%=productionVersion%>" type="text/javascript"></script>
	<% }%>

	<script src="<%=cdn%>/static/jslib/dhtmlx4/ext/dhx_i18n_<%=lang%>.js?<%=productionVersion%>"></script>
	<script src="<%=cdn%>/static/jsplatform/portal/layout/bizdata/edit_v0_i18n_<%=lang%>.js?<%=productionVersion%>"></script>
	<script src="<%=cdn%>/static/jsplatform/portal/layout/bizdata/edit_v0.js?<%=productionVersion%>"></script>


	<%--<div class="tableTabDiv">
		<ul id="navTab" class="nav nav-tabs navClear">
			<li class="active"><a href="#tabbody_1" data-toggle="tab">主表单</a></li>
			<li><a href="#tabbody_2" data-toggle="tab" id="tabnav_attach">附件&nbsp;<span class="badge badge-success"></span></a></li>
			<li id="tabnav_history"><a href="#tabbody_3" data-toggle="tab">历史</a></li>
			<li><a href="#tabbody_4" data-toggle="tab">流程图</a></li>
		</ul>
	</div>--%>

	<div id="main1" ng-controller="datactx">
		<div id="navTabContent" class="tab-content">
			<div class="tab-pane fade in active" id="tabbody_1">
				<% String formfile = (String)request.getAttribute("formfile");
		        if (formfile!=null && formfile.trim().length()>0) {%>
		        <jsp:include page="<%=formfile%>" ></jsp:include>
		        <%} %>
			</div>
			<%--<% if (attachEnable) { %>
			<div class="tab-pane fade" id="tabbody_2">
				<jsp:include page="./attachment.jsp" ></jsp:include>
			</div>
			<% } %>--%>
		</div>
	</div>


<script type="text/javascript">

    var loginName = "<%=loginName%>";
    var displayName = "<%=displayName%>";
    var lang = '<%=lang%>';
    var lang_dp = "zh-CN";

    var resloc = '<%=cdn%>';
    var engloc = "/bpmp-engine";
    var apiloc = '/bpmp-engine/api';
    var ctxpath = '<%=path%>';
    var fmdCtx = '<%=fmdCtx%>';
    var newTsId = '<%=newTsId%>';

    var imgpath = resloc+'/static/skins/lightblue/images';
    dhtmlx.image_path = resloc+'/static/skins/lightblue/assets/dhtmlx4/imgs/';	//used in grid component
    var imagepath = dhtmlx.image_path;	//used in grid component
    var dhx_skin = 'dhx_skyblue';

    $(document).ready(function(){
        var editor = new EditViewer();
        editor.init();
    });

</script>

</body>
</html>